import requests
import json

headers = {
"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 Edg/96.0.1054.62"
}

url = "https://ditu.amap.com/service/weather"

parser = {
    "adcode":"510100"
}
response = requests.get(url,headers=headers,params=parser)
ret = response.text
ret = json.loads(ret)
ret = ret["data"]["data"][0]["forecast_data"][0]
weather = ret["weather_name"]
max_temp = ret["max_temp"]
min_temp = ret["min_temp"]

print(weather,min_temp,max_temp)